package com.bjpowernode.dstaticproxy;

/*
    异性好朋友
 */
public class Friend implements Girl {

    private XiaoHong xiaoHong;

    /*
        通过构造方法传入目标对象
     */
    public Friend(XiaoHong xiaoHong) {
        this.xiaoHong = xiaoHong;
    }

    @Override
    public void eat() {
        //这里想要约小红吃饭
        xiaoHong.eat();
    }

    @Override
    public void receiveGift(int count) {

    }
}
